/**
 * yiqihao(一起好商务股份有限公司) copyright 
 */
package com.p2p.front.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.p2p.front.dal.model.UserCredits;
import com.p2p.front.enums.UserCreditsType;

/**
 *
 * @author leiruiqi@yiqihao.com
 *
 * 2015年1月28日 下午2:33:21
 */
public interface UserCreditsService {

	public boolean create(UserCredits userCredists);
	
	public boolean create(String uid,UserCreditsType type,Long value);
	
	//public UserCredits getByUserAndType(String uid,String type);
	
	public UserCredits getByUserAndTypeAutoCreate(String uid,UserCreditsType type);
	
	public UserCredits getByUserAndType(String uid,UserCreditsType type);
	
	//public boolean addValue(String uid,String type,String addValue);
	public boolean addValue(String uid,UserCreditsType type,Long addValue);
	
	//public boolean subValue(String uid,String type,String subValue);
	public boolean subValue(String uid,UserCreditsType type,Long subValue);
	
	public Map<String,UserCredits> queryByTypeAndUids(List<String> userIds,UserCreditsType type);
	
	public List<UserCredits> queryTopByType(UserCreditsType type,Integer top);
}
